//配置数据结构
const mongoose = require("mongoose");
const orderformSchema = new mongoose.Schema({
  number: Array,//商品数量
  time: String,//下单时间  格式：2020/3/14/10:36:33
  remack: String,//备注
  sellerRemack: String,//商家回复
  clock: {
    type:String,
    default:"0"
  },//订单超时 0：未超时 1：已超时  默认值：0
  isSend: {
    type:String,
    default:"0"
  },//0:未发货 1：已发货 2：已取消 3：删除订单 默认值：0
  userId: {
    type: mongoose.Schema.Types.ObjectId,
    ref: "usersModel"
  },//关联用户id
  goodId:[{
    type: mongoose.Schema.Types.ObjectId,
    ref: "goodsModel"
  }]//关联商品id
})
mongoose.model("orderformModel", orderformSchema, "orderform")